home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 913 b | 45 lines | [TEXT/ToyS] |
- on run
- choose file with prompt "Choose an application" of type {"APPL"}
- open {the result}
- end run
-
-
- on open fsObjs
- repeat with fsObj in fsObjs
- DoFile(fsObj)
- end repeat
- end open
-
-
- on DoFile(fsObj)
- set appName to the catalog name of (basic info for fsObj)
-
- tell application appName to (the number of resources in fsObj with their info)
- set resList to the result
-
- -- {{rType, {{rNum, rName}, {rNum, rName}...}}, {rType, {...}}}
- repeat with resType in resList
- set rType to item 1 of resType
- set rItems to item 2 of resType
-
- repeat with resItem in rItems
- set rNum to item 1 of resItem
-
- tell application appName to (the resource in fsObj ¬
- of type rType ¬
- numbered rNum ¬
- with its info)
-
- set rData to the result
-
- save resource (item 3 of rData) ¬
- in dstFile ¬
- named (item 2 of rData) ¬
- numbered (item 1 of rData)
- end repeat
- end repeat
-
- end DoFile
-
-
-